<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:global.cfg_webname/}</title>
<meta name="description" content="{dede:global.cfg_description/}" />
<meta name="keywords" content="{dede:global.cfg_keywords/}" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">     
<meta content="yes" name="apple-mobile-web-app-capable">     
<meta content="black" name="apple-mobile-web-app-status-bar-style">     
<meta content="telephone=no" name="format-detection">
<link href="{dede:global.cfg_templets_skin/}/style/style.css" rel="stylesheet" media="screen" type="text/css" />
<script type="text/javascript" src="{dede:global.cfg_templets_skin/}/js/jquery.js"></script>
</head>
<body class="index">
{dede:include filename="head.htm"/}
<div class="main">
	<div  class="list-zone">
			{dede:arclist row='12' imgwidth='80' imgheight='60' titlelen='60'}
				<a href="[field:arcurl/]" class="list-item-box" title="[field:title/]">
					<dl class="list-item">
						<dt class="pic">[field:image/]</dt>
						<dd><div class="news-info">
								<div class="news-title">[field:title/]</div>
								<div class="news-info-bottom">
									<span>[field:typename/]</span><span class="news-date">[field:pubdate function="MyDate('m月d日 H:s',@me)"/]</span>
								</div>
							</div>
						</dd>
					</dl>
				</a>
			{/dede:arclist}
	</div>
</div>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<ul class="listpic" id="listpic">
{dede:arclist row='6'} 
<li class="post"><a href="/pro.php?aid=[field:id/]"><img src="[field:litpic/]"></a></li>
{/dede:arclist}
</ul>
<input type="button" name="a" value="加载" onclick="loadMoreApply()">
{dede:include filename="footer.htm"/}










<script type="text/javascript">
var loadConfig = {
				url_api:'/plus/list.php',
				typeid:{dede:field name="typeid"/},
				page:2,
				pagesize:10,
				loading : 0,
				
				}
function  loadMoreApply(){
	if(loadConfig.loading == 0){
		 var sTop = document.body.scrollTop || document.documentElement.scrollTop, dHeight = $(document).height(), cHeight = document.documentElement.clientHeight;
		 var typeid = loadConfig.typeid;
		 var page = loadConfig.page;
		 var pagesize = loadConfig.pagesize;
		 
		 var url = loadConfig.url_api,data={ajax:'pullload',typeid:typeid,page:page,pagesize:pagesize};
		if (sTop + cHeight >= dHeight - cHeight) {
			 loadConfig.loading = 1;
			function ajax(url, data) {
				$.ajax({url: url,data: data,async: false,type: 'GET',dataType: 'json',success: function(data) {
				
					addContent(data);	
					
				}});
				
			}
			ajax(url,data);
		
		}
	}
}
window.addContent = function (rs){
	if(rs.statu== 1){
		var data = rs.list;
		var total = rs.total;
		var arr=[];
		var length = data.length;
		for(var i=0;i<length;i++){
			arr.push('<a href="'+data[i].arcurl+'" class="list-item-box" title="'+data[i].title+'">');
			arr.push('<dl class="list-item">');
			arr.push('<dt class="pic"><img src="'+data[i].picname+'" width="80" height="60"/></dt>');
			arr.push('<dd><div class="news-info">');
			arr.push('<div class="news-title">'+data[i].title+'</div>');
			arr.push('<div class="news-info-bottom">');
			arr.push('<span>'+data[i].typename+'</span><span class="news-date">'+data[i].pubdate+'</span>');
			arr.push('</div></dd></dl></a>');
		
		}
		$('.list-zone').append(arr.join(''));
	
		loadConfig.load_num = rs.load_num;
		loadConfig.page++;
		if(total<loadConfig.page*loadConfig.pagesize || loadConfig.page > loadConfig.load_num){
			window.removeEventListener('srcoll',loadMoreApply,false);
		}
		loadConfig.loading = 0;
	}
}
function pullLoad(){
	window.addEventListener('scroll', loadMoreApply, false);
}
pullLoad()
$(document).ready(function(){

var nav = $('.header li');
var nav_num = nav.length;
var nav_width = parseInt(nav.css('width'));
$('.header ul').css({'width':nav_num*nav_width});

})


</script>
<!-- /footer -->
</body>
</html>
